<p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:oxf="http://www.orbeon.com/oxf/processors" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" xmlns:xdb="http://orbeon.org/oxf/xml/xmldb" xmlns:xu="http://www.xmldb.org/xupdate">

	<p:param type="output" name="data"/>

	<!--Load common main-model-->
	<p:processor name="oxf:pipeline">
		<p:input name="config" href="../portal/main-model.xpl"/>
		<p:output name="data" id="datas"/>
	</p:processor>

	<!--load categories-->
	<p:processor name="oxf:xmldb-query">
		<p:input name="datasource" href="/config/datasource.xml"/>
		<p:input name="query">
			<xdb:query collection="/db/portal">
				xquery version "1.0";
				<list>{for $d in /widgetsList/category return
					$d
				}</list>
			</xdb:query>
		</p:input>
		<p:output name="data" id="cat"/>
	</p:processor>

	<p:processor name="oxf:xslt">
		<p:input name="data" href="#cat"/>
		<p:input name="translation" href="#datas#xpointer(/data/translation)"/>
		<p:output name="data" id="content"/>
		<p:input name="config" href="categories_cat.xsl"/>
	</p:processor>
	<p:processor name="oxf:identity">
		<p:input name="data" href="aggregate('data', #content, #datas#xpointer(/data/*))"/>
		<p:output name="data" ref="data"/>
	</p:processor>
</p:config>